<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Running Apache Ant</title>
<link rel="stylesheet" type="text/css" href="stylesheets/antmanual.css">
</head>

<body>

<h1>Running Dant</h1>
<h2><a name="rmi" id="rmi">Start Dant RMI Daemon</a></h2>
<p> If you've installed Dant as described in the
<a href="install.html"> Installing Dant</a> section,
running Ant from the command-line is simple: </p>
<p>For UNIX: (default port number is 1099) </p>
<pre>cd $DANT_HOME/bin<br>run_rmi_servant [port]</pre>
<p>For Windows: (default port number is 1099)
</p>
<pre>cd %DANT_HOME%/bin
run_rmi_servant.bat [port]</pre>
<h2><a name="socket">Start Dant Socket Daemon</a></h2>
<p>For UNIX: (default port number is 1979) </p>
<pre>cd $DANT_HOME/bin<br>run_socket_servant [port]</pre>
<p>For Windows: (default port number is 1979)
</p>
<pre>cd %DANT_HOME%/bin
run_socket_servant.bat [port]</pre>

<h2><a name="soap">Start Dant Daemon with SoapService</a></h2>
<p>If you are using TOMCAT, copy the $DANT_HOME/lib/dant.war under $TOMCAT_HOME/webapps.</p>
<p>For UNIX: (default port number is 1979) </p>
<pre>cd $DANT_HOME/bin<br>run_socket_servant [port]</pre>
<p>For Windows: (default port number is 1979)
</p>
<pre>cd %DANT_HOME%/bin
run_socket_servant.bat [port]</pre>
<h2><a name="local">Run Dant on localhost</a></h2>
<p> You don't need to start any daemon service for running dant locally.</p>
<h2><a name="writing">Writing a simple Dant build file</a></h2>
<p>Writing a dant build file is as same as writing a traditional ant file. </p>
<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;project name=&quot;Dant test cases&quot; default=&quot;init&quot; basedir=&quot;.&quot;&gt;
  &lt;!--
      Define the dant classpath, dant tasks, and dant types
  --&gt; 
  &lt;path id=&quot;dant.classpath&quot;&gt;<br>	  &lt;pathelement location=&quot;${basedir}/../lib/dant.jar&quot;/&gt;<br>  &lt;/path&gt;
  &lt;taskdef resource=&quot;org/dant/danttasks.properties&quot; classpathref=&quot;dant.classpath&quot;/&gt;
  &lt;typedef resource=&quot;org/dant/danttypes.properties&quot; classpathref=&quot;dant.classpath&quot;/&gt;

  &lt;!--
      Define a host named greatwall
  --&gt;
  &lt;host id="greatwall" 
        hostname="greatwall.apac.dant.org" 
        ip="10.129.9.1" 
        port="1099" 
        networking="org.dant.ant.extension.net.rmi.RMIHelper"/&gt; 

  &lt;!-- 
      Define a target remote copy, copy the readme file from the localhost to 
      greatwall
  --&gt;
  &lt;target name=&quot;remote.copy&quot;&gt;
    &lt;remotecopy filename=&quot;readme&quot; 
                srcdir=&quot;${resouces.dir}&quot; 	
                destdir=&quot;${resouces.dir}/tmp&quot;
                hostref=&quot;greatwall&quot;/&gt;
  &lt;/target&gt;
&lt;/project&gt;
</pre>
<h2><a name="run">Run the build file</a></h2>
<pre>ant remote.copy</pre>
<hr>
<p align="center">Copyright &copy; 2005 Dant Organization. All rights Reserved.</p>

</body>
</html>